﻿using SaaS.Model.Enums;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using XCore.Domain.Entities;

namespace SaaS.Model.Entity.Sites
{
    /// <summary>
    /// 站点管理员
    /// </summary>
    [Table("Site_Admins")]
    public class SiteAdmin : IEntity<int>, IHasCreationTime
    {
        [Column("AdminId"), Key]
        public int Id { get; set; }
        public int SiteId { get; set; }
        public int RoleId { get; set; }
        [Required]
        public string UserName { get; set; }
        [Required]
        public string Password { get; set; }
        /// <summary>
        /// 是否默认管理员
        /// </summary>
        public bool IsDefault { get; set; }
        /// <summary>
        /// 用户状态
        /// </summary>
        public UserStatus Status { get; set; }
        public DateTime CreationTime { get; set; }
        public string IP { get; set; }
    }
}
